package cn.edu.neu;
public class App {
    public static void main(String[] args) {
        Manage m = new Manage();
        m.manageShape(new Circle());
        m.manageShape(new Ladder());
    }
}
class Manage{
    public void manageShape(Shape s){
        s.draw();
    }
}
abstract class Shape{
    int type = 0;
   abstract public void draw();
}
class Circle extends Shape{//默认会赠送一个无参的构造函数,如果你加了带参数的
    public Circle() {
        super.type = 1;
    }
    public void draw(){
        System.out.println("该方法画圆。。。。");
    }
}
class Ladder extends Shape{//默认会赠送一个无参的构造函数,如果你加了带参数的
    public Ladder() {
        super.type = 2;
    }
    public void draw(){
        System.out.println("该方法画梯形。。。。");
    }
}

